<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简约个人博客</title>
    <style>
        /* 基础样式重置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f8f9fa;
        }

        a {
            text-decoration: none;
            color: #333;
        }

        ul {
            list-style: none;
        }

        img {
            max-width: 100%;
            height: auto;
        }

        .container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }

        .section {
            padding: 60px 0;
        }

        .section-title {
            text-align: center;
            margin-bottom: 40px;
            font-size: 2rem;
            font-weight: 300;
            color: #2c3e50;
        }

        .section-title::after {
            content: '';
            display: block;
            width: 50px;
            height: 3px;
            background: #3498db;
            margin: 15px auto;
        }

        /* 导航栏样式 */
        .navbar {
            background-color: #fff;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
        }

        .nav-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 0;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            color: #3498db;
        }

        .nav-menu {
            display: flex;
            gap: 30px;
        }

        .nav-link {
            font-size: 1rem;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .nav-link:hover {
            color: #3498db;
        }

        .hamburger {
            display: none;
            cursor: pointer;
        }

        /* 轮播图样式 */
        .carousel {
            position: relative;
            height: 500px;
            overflow: hidden;
            margin-top: 70px;
        }

        .carousel-inner {
            position: relative;
            width: 100%;
            height: 100%;
        }

        .carousel-item {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 0.5s ease-in-out;
        }

        .carousel-item.active {
            opacity: 1;
        }

        .carousel-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .carousel-caption {
            position: absolute;
            bottom: 30px;
            left: 50px;
            color: white;
            max-width: 600px;
            background: rgba(0,0,0,0.5);
            padding: 20px;
            border-radius: 5px;
        }

        .carousel-caption h3 {
            font-size: 2rem;
            margin-bottom: 10px;
        }

        .carousel-control {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0,0,0,0.5);
            color: white;
            border: none;
            font-size: 1.5rem;
            width: 50px;
            height: 50px;
            cursor: pointer;
            border-radius: 50%;
            transition: background 0.3s ease;
        }

        .carousel-control:hover {
            background: rgba(0,0,0,0.8);
        }

        .carousel-control.prev {
            left: 20px;
        }

        .carousel-control.next {
            right: 20px;
        }

        .carousel-indicators {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
        }

        .indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255,255,255,0.5);
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .indicator.active {
            background: white;
        }

        /* 文章介绍区域 */
        .articles {
            background-color: #fff;
        }

        .articles-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .article-card {
            background: #fff;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .article-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0,0,0,0.15);
        }

        .article-img {
            height: 200px;
            object-fit: cover;
        }

        .article-content {
            padding: 20px;
        }

        .article-date {
            color: #7f8c8d;
            font-size: 0.9rem;
            margin-bottom: 10px;
        }

        .article-title {
            font-size: 1.4rem;
            margin-bottom: 15px;
            color: #2c3e50;
        }

        .article-excerpt {
            color: #7f8c8d;
            margin-bottom: 20px;
        }

        .read-more {
            color: #3498db;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .read-more:hover {
            color: #2980b9;
        }

        /* 个人信息区域 */
        .about {
            background-color: #f1f2f6;
        }

        .about-content {
            display: flex;
            align-items: center;
            gap: 50px;
        }

        .about-img {
            flex: 1;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }

        .about-text {
            flex: 1;
        }

        .about-text h3 {
            font-size: 1.8rem;
            margin-bottom: 20px;
            color: #2c3e50;
        }

        .about-text p {
            margin-bottom: 20px;
            color: #555;
        }

        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 30px;
        }

        .social-link {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #3498db;
            color: white;
            transition: background 0.3s ease, transform 0.3s ease;
        }

        .social-link:hover {
            background: #2980b9;
            transform: translateY(-3px);
        }

        /* 页脚 */
        footer {
            background: #2c3e50;
            color: white;
            text-align: center;
            padding: 30px 0;
        }

        /* 响应式设计 */
        @media (max-width: 992px) {
            .about-content {
                flex-direction: column;
            }
        }

        @media (max-width: 768px) {
            .hamburger {
                display: block;
            }

            .nav-menu {
                position: fixed;
                top: 70px;
                left: -100%;
                flex-direction: column;
                background-color: white;
                width: 100%;
                text-align: center;
                transition: 0.3s;
                box-shadow: 0 10px 27px rgba(0,0,0,0.05);
                padding: 20px 0;
            }

            .nav-menu.active {
                left: 0;
            }

            .carousel {
                height: 400px;
            }

            .carousel-caption {
                left: 20px;
                right: 20px;
                bottom: 20px;
            }

            .carousel-caption h3 {
                font-size: 1.5rem;
            }
        }

        @media (max-width: 576px) {
            .section {
                padding: 40px 0;
            }

            .section-title {
                font-size: 1.6rem;
            }

            .carousel {
                height: 300px;
            }

            .carousel-caption {
                padding: 15px;
            }

            .carousel-caption h3 {
                font-size: 1.2rem;
            }

            .carousel-control {
                width: 40px;
                height: 40px;
                font-size: 1.2rem;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar">
        <div class="container nav-container">
            <a href="#" class="logo">MyBlog</a>
            <ul class="nav-menu">
                <li><a href="#" class="nav-link">首页</a></li>
                <li><a href="#" class="nav-link">文章</a></li>
                <li><a href="#" class="nav-link">关于</a></li>
                <li><a href="#" class="nav-link">联系</a></li>
            </ul>
            <div class="hamburger">
                <span>☰</span>
            </div>
        </div>
    </nav>

    <!-- 轮播图区域 -->
    <section class="carousel">
        <div class="carousel-inner">
            <div class="carousel-item active">
                <img src="https://picsum.photos/1200/500?random=1" alt="轮播图1" class="carousel-img">
                <div class="carousel-caption">
                    <h3>探索技术的无限可能</h3>
                    <p>分享最新的前端技术和开发经验</p>
                </div>
            </div>
            <div class="carousel-item">
                <img src="https://picsum.photos/1200/500?random=2" alt="轮播图2" class="carousel-img">
                <div class="carousel-caption">
                    <h3>简约而不简单</h3>
                    <p>设计哲学与用户体验的完美结合</p>
                </div>
            </div>
            <div class="carousel-item">
                <img src="https://picsum.photos/1200/500?random=3" alt="轮播图3" class="carousel-img">
                <div class="carousel-caption">
                    <h3>持续学习，不断进步</h3>
                    <p>记录成长路上的点点滴滴</p>
                </div>
            </div>
        </div>
        <button class="carousel-control prev">&#10094;</button>
        <button class="carousel-control next">&#10095;</button>
        <div class="carousel-indicators">
            <span class="indicator active"></span>
            <span class="indicator"></span>
            <span class="indicator"></span>
        </div>
    </section>

    <!-- 文章介绍区域 -->
    <section class="articles section">
        <div class="container">
            <h2 class="section-title">最新文章</h2>
            <div class="articles-grid">
                <div class="article-card">
                    <img src="https://picsum.photos/600/400?random=4" alt="文章图片" class="article-img">
                    <div class="article-content">
                        <div class="article-date">2023年5月15日</div>
                        <h3 class="article-title">现代CSS布局技巧</h3>
                        <p class="article-excerpt">深入了解Flexbox和Grid布局，掌握现代网页设计的核心技术。</p>
                        <a href="#" class="read-more">阅读全文 →</a>
                    </div>
                </div>
                <div class="article-card">
                    <img src="https://picsum.photos/600/400?random=5" alt="文章图片" class="article-img">
                    <div class="article-content">
                        <div class="article-date">2023年4月28日</div>
                        <h3 class="article-title">JavaScript异步编程</h3>
                        <p class="article-excerpt">从回调函数到Promise再到async/await，全面解析异步编程。</p>
                        <a href="#" class="read-more">阅读全文 →</a>
                    </div>
                </div>
                <div class="article-card">
                    <img src="https://picsum.photos/600/400?random=6" alt="文章图片" class="article-img">
                    <div class="article-content">
                        <div class="article-date">2023年4月10日</div>
                        <h3 class="article-title">响应式设计最佳实践</h3>
                        <p class="article-excerpt">如何创建在所有设备上都能完美显示的网页设计。</p>
                        <a href="#" class="read-more">阅读全文 →</a>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 个人信息区域 -->
    <section class="about section">
        <div class="container">
            <h2 class="section-title">关于我</h2>
            <div class="about-content">
                <div class="about-img">
                    <img src="https://picsum.photos/500/600?random=7" alt="个人照片">
                </div>
                <div class="about-text">
                    <h3>前端开发工程师</h3>
                    <p>我是一名热爱技术的前端开发工程师，专注于创建美观、实用且用户友好的网页应用。拥有5年以上的Web开发经验，擅长HTML、CSS、JavaScript等前端技术。</p>
                    <p>我相信简洁的设计和优秀的用户体验是产品成功的关键。在业余时间，我喜欢探索新技术、阅读技术博客，并分享我的学习心得。</p>
                    <p>如果你对我的工作感兴趣，或者想讨论技术问题，欢迎随时联系我。</p>
                    <div class="social-links">
                        <a href="#" class="social-link">微博</a>
                        <a href="#" class="social-link">GitHub</a>
                        <a href="#" class="social-link">LinkedIn</a>
                        <a href="#" class="social-link">Twitter</a>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 页脚 -->
    <footer>
        <div class="container">
            <p>&copy; 2023 MyBlog. 保留所有权利。</p>
            <p>Designed with ❤️ by 前端开发者</p>
        </div>
    </footer>

    <script>
        // 轮播图功能
        document.addEventListener('DOMContentLoaded', function() {
            // 轮播图元素
            const carouselItems = document.querySelectorAll('.carousel-item');
            const indicators = document.querySelectorAll('.indicator');
            const prevBtn = document.querySelector('.carousel-control.prev');
            const nextBtn = document.querySelector('.carousel-control.next');
            
            let currentIndex = 0;
            const totalItems = carouselItems.length;
            
            // 显示指定索引的轮播项
            function showSlide(index) {
                // 移除所有活动状态
                carouselItems.forEach(item => item.classList.remove('active'));
                indicators.forEach(indicator => indicator.classList.remove('active'));
                
                // 添加活动状态到当前项
                carouselItems[index].classList.add('active');
                indicators[index].classList.add('active');
                
                currentIndex = index;
            }
            
            // 下一张
            function nextSlide() {
                let newIndex = (currentIndex + 1) % totalItems;
                showSlide(newIndex);
            }
            
            // 上一张
            function prevSlide() {
                let newIndex = (currentIndex - 1 + totalItems) % totalItems;
                showSlide(newIndex);
            }
            
            // 自动轮播
            let carouselInterval = setInterval(nextSlide, 5000);
            
            // 鼠标悬停时暂停自动轮播
            const carousel = document.querySelector('.carousel');
            carousel.addEventListener('mouseenter', () => {
                clearInterval(carouselInterval);
            });
            
            carousel.addEventListener('mouseleave', () => {
                carouselInterval = setInterval(nextSlide, 5000);
            });
            
            // 按钮事件
            prevBtn.addEventListener('click', prevSlide);
            nextBtn.addEventListener('click', nextSlide);
            
            // 指示器点击事件
            indicators.forEach((indicator, index) => {
                indicator.addEventListener('click', () => {
                    showSlide(index);
                });
            });
            
            // 移动端菜单切换
            const hamburger = document.querySelector('.hamburger');
            const navMenu = document.querySelector('.nav-menu');
            
            hamburger.addEventListener('click', () => {
                navMenu.classList.toggle('active');
            });
            
            // 点击菜单项后关闭菜单
            document.querySelectorAll('.nav-link').forEach(link => {
                link.addEventListener('click', () => {
                    navMenu.classList.remove('active');
                });
            });
            
            // 滚动时导航栏效果
            window.addEventListener('scroll', () => {
                const navbar = document.querySelector('.navbar');
                if (window.scrollY > 50) {
                    navbar.style.boxShadow = '0 2px 10px rgba(0,0,0,0.1)';
                    navbar.style.background = 'rgba(255, 255, 255, 0.95)';
                } else {
                    navbar.style.boxShadow = '0 2px 10px rgba(0,0,0,0.1)';
                    navbar.style.background = '#fff';
                }
            });
        });
    </script>
</body>
</html>